<!doctype html>
<html>
<head>
	<title>登录</title>
	<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
	<meta name="format-detection" content="telephone=no"/> <!--禁止数字串在ok手机中被识别成电话号码-->
	<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
	<!-- ICO -->
	<link rel="stylesheet" href="__PUBLIC__/image/favicon.ico">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/mobile/main.css" media="all" />
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/mobile/style.css" media="all" />
	<!-- iconfont图形样式 -->
	<link rel="stylesheet" href="__PUBLIC__/css/mobile/iconfont/iconfont.css" type="text/css">
	<style type="text/css">
			input[type="button"], input[type="submit"], input[type="reset"] {
		-webkit-appearance: none;
		}
	textarea { -webkit-appearance: none;} 
		.lr{min-height: 400px;}
	</style>
</head>
<body>
<!--header页头文件-->

<div class="lr">
	<h1><img src="__PUBLIC__/images/logo.jpg" style="height:50px;"></h1>
	<ul>
		<li><input id="username" type="text" maxlength="50" autocomplete="off" placeholder="请输入用户名" value=""></li>
		<li><input id="password" type="text" maxlength="50" autocomplete="off" placeholder="请输入登录密码" value=""></li>
	</ul>
	<div class="lr_sub">
		<input type="submit" onclick="keyLogin()" value="=立即登录=" class="submit">
	</div>
</div>
<script src="__PUBLIC__/js/jquery-1.10.1.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/js/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>
<script src="__PUBLIC__/plugins/layer/layer.min.js"></script>
<script type="text/javascript">
	function keyLogin(){
		var username = $("#username").val();
		var password = $("#password").val();
		var url = "{:U('Index/login')}";
		$.post(url,{'username':username,'password':password},function(result){
			if (result.status == 1) {
				window.location.href="{:U('Index/index')}";
			}
			if (result.status ==0) {
				alert(result.message);
			}
			if (result.status ==2) {
				alert(result.message);
				window.location.href="{:U('Lignt/index')}";
			}
		},"JSON");
	}
</script>

</body>
</html>